import moment from "moment";
import storageHelper from './storageHelper';
let httpBaseURL = value => {
    if(value && value !== ''){
        value = this.$baseURL + '/comm/resource/'+ value + '?token=' + storageHelper.get('channel_token');
    }else{
        value = '';
    }
    return value;
}

let dateformat = (value,pattern = 'YYYY-MM-DD HH:mm:ss') => {
    if(value >0){
        return moment(value * 1000).format(pattern);
    }else{
        return '';
    }
}
export default {
    httpBaseURL,
    dateformat
}
